<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class SpeechcraftBranch extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('speechcraft_branch', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('speechcraft_id')->default(0)->comment('话术ID');
            $table->string('name',40)->comment('名称');
            $table->text('answer')->nullable()->comment('答法，json字符串');
            $table->tinyInteger('is_default')->default(0)->comment('是否是系统默认，0否，1是');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('speechcraft_branch');
    }
}
